/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.overall.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author wzy
* @date 2024-11-28
**/
@Entity
@Data
@Table(name="sys_grade")
public class SysGrade implements Serializable {

    @Id
    @Column(name = "`stuid`")
    @ApiModelProperty(value = "学号")
    private Integer stuid;

    @Column(name = "`classid`")
    @ApiModelProperty(value = "课程号")
    private Integer classid;

    @Column(name = "`kaoqin`")
    @ApiModelProperty(value = "考勤成绩")
    private Integer kaoqin;

    @Column(name = "`homework`")
    @ApiModelProperty(value = "作业成绩")
    private Integer homework;

    @Column(name = "`replycount`")
    @ApiModelProperty(value = "回答问题成绩")
    private Integer replycount;

    @Column(name = "`task`")
    @ApiModelProperty(value = "任务点成绩")
    private Integer task;

    @Column(name = "`overall`")
    @ApiModelProperty(value = "总成绩")
    private Integer overall;

    @Column(name = "`name`")
    @ApiModelProperty(value = "姓名")
    private String name;

    public void copy(SysGrade source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
